﻿
// ClickerDlg.h: 头文件
//

#pragma once

#include <vector>
#include <map>
#include "Routine/DeathKnight/DkActionUnholy.h"
#include "Routine/DeathKnight/DkActionBlood.h"
#include "BuffDlg.h"
#include "ConfigDlg.h"

// CClickerDlg 对话框
class CClickerDlg : public CDialogEx
{
	// 构造
public:
	CClickerDlg(CWnd* pParent = nullptr);	// 标准构造函数

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_CLICKER_DIALOG };
#endif
	static CClickerDlg* getInst();

protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV 支持


// 实现
protected:
	HICON m_hIcon;

	// 生成的消息映射函数
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:

	afx_msg void OnBnClickedButtonTestaction();
	afx_msg void OnHotKey(UINT nHotKeyId, UINT nKey1, UINT nKey2);
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	afx_msg void OnBnClickedButtonBuff();
private:

	bool ShowInfo();
	//////////////////////////////////////////////////////////////////////////

	void ClearActionHistory();
	void DelTimerClearAction();

	void InitRegisteKey();
	void ShowRuneInfo();
	// API
private:
	// clear action
	time_t time_want_clear_action_ = 0;
	//
	void InitListMsg();
	void SetActionState(int index, CString text);
	void SetActionCDMsg(int index, LPCWSTR msg, int spell_id, int cd, int gcd);
	void SetActionCDMsg_Blank(int index);
	// UI
	void ShowBaseInfo();
	void ShowActionInfo();

	void SetActionRangeTypeMsg(int index, int in_range, int type);
	void SetActionRangeTypeMsg_Blank(int index);
public:
	CStatic text_state_;
	CStatic text_target_;
	// 	CStatic text_buff_;
	// 	CStatic text_debuff_;
public:
	CListCtrl list_action_;
	CListCtrl list_action_history_;
	CButton btn_helper_enbale;
private:

private:
	CStatic text_battle_;
	CStatic text_rune_;
	BuffDlg	* buff_dlg_ = NULL;
	ConfigDlg * config_dlg_ = NULL;
public:
	CComboBox combo_sel_win;
private:
	void ShowSelCombo();
public:
	afx_msg void OnSelchangeComboSelWindow();
	afx_msg void OnBnClickedButtonConfig();

};
